package com.bili.bili_data_api.controller;

import com.bili.bili_data_api.dao.pojo.RichangArea;
import com.bili.bili_data_api.dao.pojo.bangumi;
import com.bili.bili_data_api.service.ShengHuoService;
import com.bili.bili_data_api.util.Result;
import com.bili.bili_data_api.vo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("shengHuo")
public class ShengHuoController {

    @Autowired
    private ShengHuoService shengHuoService;

    @PostMapping(value = {"edit"},produces = {"application/json; charset=UTF-8"})
    public Result edit(@RequestBody ShengHuoList shengHuoVo){
        return shengHuoService.edit(shengHuoVo);
    }
    @PostMapping(value = {"delete"},produces = {"application/json; charset=UTF-8"})
    public Result delete(@RequestBody ShengHuoList shengHuoVo){
        return shengHuoService.delete(shengHuoVo);
    }
    @PostMapping(value = {"add"},produces = {"application/json; charset=UTF-8"})
    public Result add(@RequestBody RichangArea shengHuoVo){
        return shengHuoService.add(shengHuoVo);
    }
    @PostMapping(value = {"selectByTitle"},produces = {"application/json; charset=UTF-8"})
    public ShengHuoVo selectByTitle(@RequestBody QueryVo query){
        return shengHuoService.selectByTitle(query);
    }

}
